package com.xiangge.zuoye.Demo1;

/**
 * @author xiyu
 * @version 1.0
 * @date 2025/3/18 14:14
 * @description 员工类
 */
public class Employee {
    private Integer id;
    private String name;
    private Integer age;
    private double salary;

    public Employee() {
    }

    public Employee(Integer id, String name, Integer age, double salary) {
        this.id = id;
        this.name = name;
        this.age = age;
        this.salary = salary;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    public double getSalary() {
        return salary;
    }

    public void setSalary(double salary) {
        this.salary = salary;
    }

    public void getInfo(){
        System.out.println("编号："+id+",姓名："+name+
                ",年龄："+age+",薪资："+salary+"，职位：普通员工");
    }

    @Override
    public String toString() {
        return "Employee{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", age=" + age +
                ", salary=" + salary +
                '}';
    }
}
